<?php

class UserController extends Controller {

    public function __construct() {
        if (empty($_REQUEST["action"])) {
            $this->index();
        } else {
            $this->$_REQUEST["action"]();
        }
    }

    public function index() {
        die("hello paco");
    }

    public function view() {
        $user = User::getOneById('User', 28);
        $this->display('view',$user);
    }

    public function listar() {
        $users = User::getAll('User');
        $this->set("usuarios", $users);
        $this->display();
    }


}

?>
